package com.example.service;

import com.example.dao.UserDao;
import com.example.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public User queryUserById(int id){
        return userDao.getUserById(id);
    }
    public List<User> queryUserByAge(int age){
        return userDao.getUserByAge(age);
    }
    public String userLogin(String username, String password){
        return userDao.getUserLogin(username, password);
    }
}
